<template>
  <div class="recommend" v-if="recommends" >
    <div class="itemView" v-for="(item, index) in recommends" :key='index'>
      <a :href="item.link">
        <img :src="item.image" alt="">
        <div>{{item.title}}</div>
      </a>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'RecommendView',
    props: {
      recommends: {
        type: Array,
        default() {
          return []
        }
      }
    }
  }
</script>

<style>
  .recommend {
    display: flex;
    text-align: center;
    width: 100%;
    font-size: 12px;
    padding: 10px 0px 20px 0px;
    
    border-bottom: 10px solid #eee;
    /* flex: 1; */
  }
  .itemView {
    flex: 1;
    /* display: block; */
  }

  .itemView img {
    /* width: 2em */
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
  }
</style>